package com.zhuiyun.project.api.addfriend.service;

import com.zhuiyun.project.api.addfriend.entity.AddFriend;
import com.zhuiyun.project.api.addfriend.model.AppFriendModel;
import com.zhuiyun.project.common.response.CommonResult;

import java.util.List;

/**
 * @ClassName AddService
 * @Description TODO
 * @Author kdj
 * @Date 2023/6/20 14:26
 **/
public interface AddFriendService {
    /**
     * @param appFriendModel
     * @Author kdj
     * @Description 新增添加好友的请求数据
     * @Date 2023/6/21 19:30
     * @Return com.zhuiyun.project.common.response.CommonResult
     */
    CommonResult addFriend(AppFriendModel appFriendModel);

    /**
     * @param userId
     * @param friendId
     * @Author kdj
     * @Description 获取之前有过添加好友请求
     * @Date 2023/6/21 20:16
     * @Return int
     */
    AddFriend getAddByUserIdAndFriendId(int userId, int friendId);

    /**
     * @param userId
     * @Author kdj
     * @Description 查询我请求过的或者好友请求的数据
     * @Date 2023/6/21 21:07
     * @Return com.zhuiyun.project.common.response.CommonResult
     */
    CommonResult getFriendRequestList(int userId);

    /**
     * @param userId
     * @Author kdj
     * @Description 根据userId查询AddFriend数据库
     * @Date 2023/6/21 21:10
     * @Return java.util.List<com.zhuiyun.project.api.addfriend.entity.AddFriend>
     */
    List<AddFriend> getAddFriendByUserId(int userId);

    /**
     * @param friendId
     * @Author kdj
     * @Description 根据friendId查询AddFriend数据库
     * @Date 2023/6/21 21:11
     * @Return java.util.List<com.zhuiyun.project.api.addfriend.entity.AddFriend>
     */
    List<AddFriend> getAddFriendByFriendId(int friendId);

    /**
     * @param appFriendModel
     * @Author kdj
     * @Description 同意好友添加好友请求
     * @Date 2023/6/23 11:51
     * @Return com.zhuiyun.project.common.response.CommonResult
     */
    CommonResult addFriendOK(AppFriendModel appFriendModel);

    /**
     * @param appFriendModel
     * @Author kdj
     * @Description 拒绝添加好友请求
     * @Date 2023/6/23 16:42
     * @Return com.zhuiyun.project.common.response.CommonResult
     */
    CommonResult addFriendNo(AppFriendModel appFriendModel);

    /**
     * @param userId
     * @param otherUserId
     * @Author kdj
     * @Description 判断之前是否有过好友请求
     * @Date 2023/7/21 11:10
     * @Return com.zhuiyun.project.common.response.CommonResult
     */
    CommonResult queryAddFriendRecord(int userId, int otherUserId);
}
